package com.qust.rest.controller;

import com.qust.securityapi.service.HasRoles;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;



/**
 * @author Frank KONG
 * @version 1.0
 * @date 2021/11/22 19:17
 */
@Api(tags = "欢迎页面")
@RestController
@RequestMapping(value = "/test")
public class TestController {

    Logger logger = LoggerFactory.getLogger(TestController.class);

    @ApiOperation("测试")
    @RequestMapping(value = "/t1", method = RequestMethod.GET)
    @HasRoles(roles = {"test", "test1", "test2"})
    public void test(){
        logger.info("logger test");
        System.out.println("hello!");
    }

}
